<?php include 'product_compare_css.php'; ?>
<div id="container">
    <?php include 'home_header.php'; ?>
    <div id="main">
        <div>
            <h1 class="compare-title">So sánh sản phẩm</h1>
            <div id="compare_table">
                
                <table cellpadding=5 cellspacing=3 border=1 bordercolor=#CCCCCC style="border-collapse:collapse;">
                    <tr>
                        <td class="firstColumnCompare" width="94px">
                            Ảnh sản phẩm
                        </td>
                        <?php foreach ($aryProduct as $key => $value) {?>
                        <td class="compare-pro-item" width="292px" align="center">
                            <div style="overflow: hidden;clear: both;">
                                <div>
                                    <img src="<?php echo $value['product_main_image'];?>">
                                </div>
                                <div>
                                    <?php if (in_array($value['product_id'], $aryOrderProductId)) { ?>
                                    <div>
                                        Đã có trong giỏ hàng
                                    </div>
                                    <div>
                                        <a href="/order/chi-tiet-gio-hang.html" title="Xem giỏ hàng" style="color: red;">Xem giỏ hàng</a>
                                    </div>
                                <?php } else { ?>
                                    <div id="product_order_<?php echo $value['product_id']; ?>">
                                        <div class="btnorder" onclick="MyController.addProductToShopCat(<?php echo $value['product_id']; ?>, <?php echo $value['product_category_id']; ?>);"></div>
                                    </div>
                                <?php } ?>
                                </div>
                            </div>
                            
                        </td>
                        <?php } ?>
                    </tr>
                    <tr>
                        <td class="firstColumnCompare">
                            Tên sản phẩm
                        </td>
                        <?php foreach ($aryProduct as $key => $value) {?>
                        <td class="compare-pro-item">
                            <?php echo $value['product_title'];?>
                        </td>
                        <?php } ?>
                    </tr>
                    <tr>
                        <td class="firstColumnCompare">
                            Giá bán
                        </td>
                        <?php foreach ($aryProduct as $key => $value) {?>
                        <td class="compare-pro-item">
                            <?php echo ($value['product_price_vnd'] != 0) ? number_format($value['product_price_vnd'], 0, ',', '.') . '&nbsp;VNĐ' : 'Call'; ?>
                        </td>
                        <?php } ?>
                    </tr>
                    <tr>
                        <td class="firstColumnCompare">
                            Mô tả sản phẩm
                        </td>
                        <?php foreach ($aryProduct as $key => $value) {?>
                        <td class="compare-pro-item">
                            <?php echo strip_tags($value['product_highlight']);?>
                        </td>
                        <?php } ?>
                    </tr>
                </table>
            </div>

        </div>

    </div>

    <div class="clear"></div>

    <?php include 'home_footer.php'; ?>

</div>
